body {
    background-color: #f9faff;
}

.cart-top-banner {
    background-color: #fff;
    text-align: center;
    padding: 20px;
}

.cart-top-title {
    font-size: 32px;
    font-weight: 500;
    color: #1f2329;
    margin-bottom: 16px;
    margin-top: 30px;
    font-weight:700;
}

.cart-top-subtitle {
    font-size: 14px;
    color: #5f646a;
}

.cart-nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background: #fff;
    width: 100%;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
    z-index: 2;
}

.cart-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #5f646a;
    padding: 20px 40px 12px 40px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.cart-nav-item .cart-nav-item-icon {
    display: inline-block;
    width: 72px;
    height: 72px;
    background-position: left;
    background-size: 2300% 100%; /* 23帧雪碧图总宽度 */
    will-change: background-position; /* 优化动画性能 */
    margin-bottom: 7px;
    transition: all 0.3s;
}
.cart-nav .cart-nav-item:nth-child(1) .cart-nav-item-icon{ /* 修正伪类语法 */
    background-image: url('../img/recommend.png');
}
.cart-nav .cart-nav-item:nth-child(2) .cart-nav-item-icon{
    background-image: url('../img/count.png');
}
.cart-nav .cart-nav-item:nth-child(3) .cart-nav-item-icon{
    background-image: url('../img/network.png');
}
.cart-nav .cart-nav-item:nth-child(4) .cart-nav-item-icon{
    background-image: url('../img/security.png');
}
.cart-nav .cart-nav-item:nth-child(5) .cart-nav-item-icon{
    background-image: url('../img/storage.png');
}
 .animate-frame-in {
    animation: animateframein 0.5s steps(23) forwards;
}
.animate-frame-out {
    animation: animateframeout 0.5s steps(23) forwards;
}
@keyframes animateframein {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
@keyframes animateframeout {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

.cart-nav-item-active {
    color: #0052ff;
    font-weight: 500;
    border-bottom: 3px solid #0052ff;
}

.cart-nav-item:hover {
    color: #0052ff;
}

.cart-products {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 0;
    background-color: #f2f4f7;
}

.cart-products-row {
    display: flex;
    justify-content: space-between;
}
.cart-products-row:nth-child(1){
    margin-bottom: 15px;
}
.cart-product-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    position: relative;
    transition: all 0.3s;
    border: 1px solid #fff;
    overflow: hidden;
}

.cart-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-content {
    padding: 24px;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-product-card.large {
    flex: 1 1 0;
    min-width: 0;
    max-width: 32.7%;
    padding: 0;
}
.cart-product-card.large:nth-child(1){
    background-image: url('../img/game-bg_01.jpg');
    background-size: cover;
}
.cart-product-card.large:nth-child(2){
    background-image: url('../img/kws-bg_01.jpg');
    background-size: cover;
}
.cart-product-card.large:nth-child(3){
    background-image: url('../img/cdn-bg_01.jpg');
    background-size: cover;
}

.card-hot {
    background: #ffe8e8;
    color: #ff4d4f;
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 6px;
    font-weight: normal;
    border: 1px solid #ffccc7;
}

.card-price {
    font-size: 22px;
    font-weight: bold;
    color: #0052ff;
}

.card-price-unit {
    font-size: 12px;
    color: #888;
    margin-left: 2px;
    font-weight: normal;
}

.mobile-swiper-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}
.mobile-swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}


.mobile-swiper-container .mobile-cart-product-card {
    flex: 0 0 100%;
}
.mobile-swiper-container .mobile-cart-product-card:nth-child(1){
    background-image: url('../img/game-bg_01.jpg');
    background-size: cover;
}
.mobile-swiper-container .mobile-cart-product-card:nth-child(2){
    background-image: url('../img/kws-bg_01.jpg');
    background-size: cover;
}
.mobile-swiper-container .mobile-cart-product-card:nth-child(3){
    background-image: url('../img/cdn-bg_01.jpg');
    background-size: cover;
}

.swiper-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}
.swiper-prev, .swiper-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.swiper-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin:6px;
}
.swiper-dot {
    width: 6px;
    height: 6px;
    border: none;
    border-radius: 50%;
    background: #fff;
}
.swiper-dot.active {
    background: #0052ff;
}
.mobile-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scrollbar-width: none;
}
.mobile-scroll-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.mobile-scroll-container .mobile-cart-product-card {
    flex: 0 0 75%;
}
.mobile-show-more-content {
    overflow: hidden;
    transition: height 0.3s ease;
    height: 0;
}

.mobile-show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    cursor: pointer;
    color: #0052ff;
}
.show-more-icon {
    display: inline-block;
    width: 7px;
    height: 7px;
    border: solid #0052ff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform 0.3s;
}
.mobile-show-more.expanded .show-more-icon {
    transform: rotate(-135deg);
}

.mobile-cart-product-card {
    flex-shrink: 0;
    width: 100%;
    height: 160px;
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #fff;
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
}

.mobile-cart-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.mobile-cart-product-card.medium {
    background: #fff;
    border: 1px solid #fff;
    height: 160px;
}

.mobile-cart-product-card.medium1{
    background: #fff;
    border: 1px solid #fff;
    height: 118px;
}

.card-content {
    padding: 24px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
}

.card-hot {
    background: #ffe8e8;
    color: #ff4d4f;
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 6px;
    font-weight: normal;
    border: 1px solid #ffccc7;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tag {
    border: 1px solid #d6e4ff;
}

@media (max-width: 1100px) {
    .cart-products-row {
        flex-direction: column;
        gap: 16px;
    }
    .cart-product-card.large, .cart-product-card.medium {
        max-width: 100%;
    }
}
.cart-product-card.medium {
    flex: 1 1 0;
    min-width: 0;
    max-width: 25%;
    padding: 22px 24px;
    background: linear-gradient(to bottom, #ebeef5, #fff);
    border: 1px solid #fff;
    transition: all 0.3s;
}

.cart-product-card.medium:hover{
    background-image: url('../img/hoverbg.png');
    background-size: cover;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3eaff 0%, #f7faff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #2563ff;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 255, 0.1);
}
.card-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}
.card-hot {
    background: #ff4d4f;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 6px;
    font-weight: normal;
}
.card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 13px;
    line-height: 1.5;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.card-tag {
    display: inline-block;
    background: #eef1f7;
    color: #626266;
    height: 22px;
    line-height: 22px;
    font-size: 12px;
    padding: 0 7px;
    margin-right: 8px;
    margin-bottom: 9px;
}
.card-bottom {
    display: flex;
    align-items: center;
    margin-top: auto;
    width: 100%;
    gap: 12px;
    justify-content: space-between;
}

.card-btn {
    background: transparent;
    color: #999;
    border: none;
    width: 78px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.show-more-text{
    cursor: pointer;
    color: #0052ff;
}
.cart-product-card.medium:hover .card-btn{
    background: #2677eb;
    color: #fff;
}
.mobile-swiper-container,.mobile-scroll-container,.mobile-show-more{
    display: none;
}

@media (max-width: 470px) {
    .cart-products-row,.cart-nav-item .cart-nav-item-icon{
        display: none;
    }
    .mobile-swiper-container,.mobile-scroll-container{
        display: block;
    }
    .mobile-show-more{
        display: flex;
    }
    .cart-products{
        padding: 15px;
        box-sizing: border-box;
    }
    .cart-nav-item{
        padding: 10px;
        font-size: 15px;
    }
    .cart-top-banner{
        padding: 15px;
    }
    .cart-top-title{
        font-size: 20px;
        font-weight: 600;
    }
    .cart-top-subtitle{
        font-size: 13px;
    }
    .card-title{
        margin-bottom: 6px;
    }
    .card-desc{
        font-size: 13px;
        margin-bottom: 10px;
        width: 70%;
    }
    .card-tag{
        font-size: 11px;
        height: 20px;
        line-height: 20px;
    }
    .card-tags{
        margin: 0;
    }
    .card-price{
        font-size: 16px;
    }
    .card-price-unit{
        font-size: 13px;
    }
    .card-content{
        padding: 15px;
    }
    .card-btn{
        width: 80px;
        height: 27px;
        line-height: 27px;
        background-color: #2981ff;
        color: #fff;
        font-size: 14px;
    }

    .card-bottom{
        margin: 0;
    }
    .mobile-cart-product-card.medium1 .card-bottom{
        margin-top: -35px;
        margin-left: auto;
        width: 30%;
    } 
    
    .mobile-cart-product-card.medium .card-tag,.mobile-cart-product-card.medium1 .card-tag{
        background-color: transparent;
    }
    .cart-nav{
        padding: 0 10px;
    }
}

